package com.wmx.controller;

import com.wmx.entity.RoleEntity;
import com.wmx.entity.UserEntity;
import com.wmx.vo.ResultVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.ContextLoaderListener;

import java.util.concurrent.TimeUnit;

@Controller
@RequestMapping("/sys/user")
public class UserController {

    @ResponseBody
    @GetMapping("/list")
    public ResultVO queryUserInfo(UserEntity userEntity){

        return ResultVO.getSuccess("成功");
    }



    public RoleEntity queryRoleEntity() throws InterruptedException {
        TimeUnit.SECONDS.sleep(10);
       return new RoleEntity(1L,"超级管理员");
    };

    public UserEntity  queryUserEntity() throws InterruptedException{
        TimeUnit.SECONDS.sleep(10);
        return new UserEntity(1L,"张三",20);
    }
}
